<?php
namespace common\components;

use yii\base\Component;
use common\components\DoraRPC\Client;

/**
 * @author jianbiao11 <[<email address>]>
 */
class SwooleClient extends Component
{
    public $client;
    public function init() {
      parent::init();
      $this->client = new Client();
    }

    
    public function initConfig($serverConfig){
         $this->client->setServerConfig($serverConfig);
    }

    /**
     * 改变客户端连接模式
     * @param  [type] $mode [description]
     * @return [type]       [description]
     */
    public function changeMode($mode){
         $this->client->changeMode($mode);
    }

    public function getClient(){
        return $this->client;
    }
   
}
